package cn.edu.nchu.service.impl;

import cn.edu.nchu.dao.DeviceModelDao;
import cn.edu.nchu.entity.DeviceModel;
import cn.edu.nchu.service.DeviceModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeviceModelServiceImpl implements DeviceModelService {
    @Autowired
    private DeviceModelDao deviceModelDao;

    @Override
    public DeviceModel findByDeviceId(String deviceId) {
        return deviceModelDao.findByDeviceId(deviceId);
    }

    @Override
    public DeviceModel deleteByDeviceId(String deviceId) {
        return deviceModelDao.deleteByDeviceId(deviceId);
    }

    @Override
    public DeviceModel saveAndFlush(DeviceModel deviceModel) {
        return deviceModelDao.saveAndFlush(deviceModel);
    }
}
